<extend name="public:template"/>

<block name="title">单页内容编辑</block>
<block name="content">
	<div class="wrap-page">
		<div id="pageMemberInfo" class="page-content">
			<form class="form default-style" role="form" action="{:u('backend/article/page_edit')}" method="post">

				<input type="hidden" name="cate_id" value="{$_GET['cate_id']}">
				<div id="tabSwitchProduct" class="tab-switch">

					<!--选项卡-->
					<div class="tabs-title clearfix">
						<ul>
							<li class="current"><a data-id="tab-basic" href="javascript:;">基本信息</a></li>
							<li><a data-id="tab-seo" href="javascript:;">{:L('article_seo')}</a></li>
						</ul>
					</div>
					<!--选项卡-->

					<!--编辑区域-->
					<div class="tab-content">
						<div id="tab-basic-content" class="tab-content-inner">
							<div id="boxBasicInfo" class="box">
								<div class="box-content">

									<dl class="clearfix">
										<dt><label>标题：</label></dt>
										<dd>
											<div class="item-field clearfix">
												<input id="title" placeholder="请输入文章标题" class="textfield" type="text" value="{$info.title}" name="title" />
											</div>
										</dd>
									</dl>

									<dl class="clearfix">
										<dt><label>详细内容：</label></dt>
										<dd>
											<div class="item-field clearfix">
												<textarea name="content" id="content">{$info.content}</textarea>
											</div>
										</dd>
									</dl>

								</div>
							</div>
						</div>

						<div id="tab-seo-content" class="tab-content-inner" style="display: none">
							<div class="box">
								<div class="box-content">
									<dl class="clearfix">
										<dt><label>{:L('seo_title')}：</label></dt>
										<dd>
											<div class="item-field clearfix">
												<input id="seo_title" placeholder="请输入{:L('seo_title')}"  class="textfield" type="text" name="seo_title" value="{$info.seo_title}" />
											</div>
										</dd>
									</dl>

									<dl class="clearfix">
										<dt><label>{:L('seo_keys')}：</label></dt>
										<dd>
											<div class="item-field clearfix">
												<input id="seo_keys" placeholder="请输入{:L('seo_keys')}"  class="textfield" type="text" name="seo_keywords" value="{$info.seo_keywords}" />
											</div>
										</dd>
									</dl>

									<dl class="clearfix">
										<dt><label>{:L('seo_desc')}：</label></dt>
										<dd>
											<div class="item-field clearfix">
												<textarea id="seo_description" placeholder="请输入{:L('seo_desc')}"  class="textarea" type="text" name="seo_description">{$info.seo_description}</textarea>
											</div>
										</dd>
									</dl>

								</div>
							</div>
						</div>
					</div>
					<!--编辑区域END-->
				</div>
				<div class="page-buttons clearfix">
					<div class="fl-l">
						<button type="button" class="button button-blue" id="save">保存</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</block>
<block name="script">
	<script charset="utf-8" src="__STATIC__/editor/kindeditor-all-min.js"></script>
	<script charset="utf-8" src="__STATIC__/editor/lang/zh-CN.js"></script>
	<script>
		//初始化编辑器
		KindEditor.ready(function(K) {
			window.editor = K.create('#content',{
				width: '670px',
				height: '360px',
				afterBlur: function(){this.sync();}
			});
		});

		$(document).ready(function(){

			$('#save').click(function(){
				$('.form').submit();
			});
		});
	</script>
</block>
